//
//  YSNavigationController.m
//  YSKitDemo
//
//  Created by MOLBASE on 2018/8/15.
//  Copyright © 2018年 YangShen. All rights reserved.
//

#import "YSNavigationController.h"

@interface YSNavigationController ()

@end

@implementation YSNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];

}

#warning 这里解决Tabbar跳动问题
/// 解决Tabbar跳动问题
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
    if (self.viewControllers.count > 0) {
        viewController.hidesBottomBarWhenPushed = YES;
    }
    [super pushViewController:viewController animated:animated];
    
    if (k_IPHONE_X) {
        // 修改tabBra的frame 去掉跳转动画.
        CGRect frame = self.tabBarController.tabBar.frame;
        frame.origin.y = [UIScreen mainScreen].bounds.size.height - frame.size.height;
        self.tabBarController.tabBar.frame = frame;
    }
}


@end
